package five.autoview.activity;

import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.widget.ImageView;

import five.autoview.R;

/**
 * Created by rilintech on 16/6/16.
 */

public class JianGeXianActivity extends Activity {

    private ImageView iv;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_wen_zi);

        iv = (ImageView) findViewById(R.id.image);
        Bitmap bmpBuffer = Bitmap.createBitmap(500, 800, Bitmap.Config.ARGB_8888);
        Canvas canvas = new Canvas(bmpBuffer); Paint paint = new Paint(); paint.setColor(Color.RED); paint.setStrokeWidth(1);
        final int offsetDy = 50; for(int i = 0; i < 5; i ++){
            canvas.drawLine(10, 10, 300 + offsetDy, offsetDy * i, paint); }
        iv.setImageBitmap(bmpBuffer);

    }
}
